//
//  ClientDao.m
//  BSoftWorkLog
//
//  Created by viola on 2017/8/30.
//  Copyright © 2017年 zarra. All rights reserved.
//

#import "ClientDao.h"

@implementation ClientDao
+ (NSString *)getUserName
{
    return [self getInfoWithKey:kUserName];
}

+ (NSString *)getPassWord
{
    return [self getInfoWithKey:kUserPassword];
}
+ (void)setPassWord:(NSString *)passWord
{
    NSMutableDictionary *clientDic = [self getClientDic];
    [clientDic setObject:passWord forKey:kUserPassword];
    kSAVE_VALUE(clientDic, kGetValueForKey(kUserName));
}

+ (NSString *)getInfoWithKey:(NSString *)key
{
    return [kGetValueForKey(kGetValueForKey(kUserName)) objectForKey:key];
}

+ (NSMutableDictionary *)getClientDic
{
    NSDictionary *dic = kGetValueForKey(kGetValueForKey(kUserName));
    NSMutableDictionary *clientDic = [NSMutableDictionary dictionaryWithDictionary:dic];
    return clientDic;
}


@end
